Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Similar to how we've supported
print()
, I reserved a dedicated area in the Metal buffer to store assertion failure messages. The assertion message and print messages are placed in the same buffer for simplicity. Here's the buffer memory layout:We only store the error message of the first assertion failure. This is done by using
AssertRecorder::mark_first_failure()
. Under the hood it's just an atomic flag.Sample generated code:
To answer @archibate question in #1955 (review), hopefully it's now clear? These backends can all share
format_error_message()
, which does the formatting of%
.This PR is not urgent at all. Please take your time and consider it low priority if you have other things to deal with...
Related issue = #1955
[Click here for the format server]